Socket
Socket
Sign inDemoInstall

@hig/icons

Package Overview
Dependencies
Maintainers
6
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/icons

HIG icon assets


Version published
Weekly downloads
800
increased by29.66%
Maintainers
6
Weekly downloads
 
Created
Source

Icons

This package retains the source of the library of HIG icons. You can import individual icons to render on your app.

import { Assets24 } from "@hig/icons";

const MyComponent = () => (
    <div className="my-class">
        <Assets24 />
    </div>
);

export default MyComponent

Read more about where and how to use icons on the website.

Getting started

Install the package

yarn add @hig/icons @hig/theme-context @hig/theme-data

Developing

Adding a New Icon

To add a new SVG icon to the library, add the svg file to the src/icons directory.

Then run the following command:

yarn build-icons

This will use SVGO to optimize the new icon, and update our release files. Remember to commit these changes.

Accessing SVG source files

SVG source files for all icons are available in the build/svg subdirectory of the @hig/icons package (e.g. ./node_modules/@hig/icons/build/svg).

Styling

Use the className prop to pass in a css class name to the outermost container of the component. The class name will also pass down to most of the other styled elements within the component.

Icons can take a color prop that will accept any hex code, rgb, rgba, or color string that can change the default color. Icons also has a stylesheet prop that accepts a function wherein you can modify its styles.

FAQs

Package last updated on 12 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc